import request from '@/utils/request'

export default {
  getJobList(searchModel) {
    return request({
      url: '/myboard/job/jobList',
      method: 'get',
      params: {
        pageNo: searchModel.pageNo,
        pageSize: searchModel.pageSize,
        role: searchModel.role,
        partyId: searchModel.partyId,
        partner: searchModel.partner,
        status: searchModel.status,
        note: searchModel.note
      }
    })
  },
  sumbmitJob(fileList) {
    const fd = new FormData()
    fileList.forEach((file) => {
      fd.append('file', file.raw)
    })
    console.log(fd)
    const config = { headers: { 'Content-Type': 'multipart/form-data' }}
    return request({
      url: '/myboard/job/submitJob',
      method: 'post',
      headers: config,
      data: fd
    })
  }
}
